# https://leetcode.cn/problems/single-number/description/?envType=problem-list-v2&envId=array
from typing import List


class Solution:
    def singleNumber(self, nums: List[int]) -> int:
        list_count = []
        for i in nums:
            list_count.append(nums.count(i))
        small_index = list_count.index(1)
        return nums[small_index]


if __name__ == '__main__':
    s = Solution()
    print(s.singleNumber([2, 2, 1]))
